/**
 *@brief BasicInformation 描述mesh设备基本信息
 *
 */
#pragma once

#include <string>
#include <json/json.h>
#include <lib/core/DataModelTypes.h>

using namespace chip;

class BasicInformation
{
public:
    [[nodiscard]] std::string ToString() const;
    static BasicInformation* Create(const Json::Value &root);

private:
    BasicInformation() = default;

    std::string mLabel;
    std::string  mVendorName;
    std::string mProductName;
    std::string mManufacturingDate;
    std::string mSerialNumber;
    std::string mUniqueId;
    DeviceTypeId mDeviceType{};
    EndpointId mEndpoint{};
    EndpointId mParentId = kInvalidEndpointId;
    Json::Value mExtra;

public:
    [[nodiscard]] std::string GetLabel() const { return mLabel; }
    [[nodiscard]] Json::Value GetExtra() const { return mExtra; }
    [[nodiscard]] std::string GetVendorName() const { return mVendorName; }
    [[nodiscard]] std::string GetProductName() const { return mProductName; }
    [[nodiscard]] std::string GetSerialNumber() const { return mSerialNumber; }
    [[nodiscard]] std::string GetManufacturingDate() const { return mManufacturingDate; }
    [[nodiscard]] std::string GetUniqueId() const { return mUniqueId; }
    [[nodiscard]] DeviceTypeId GetDeviceType() const { return mDeviceType; }
    [[nodiscard]] EndpointId GetParentId() const { return mParentId; }
    [[nodiscard]] EndpointId GetEndpoint() const { return mEndpoint; }
};
